package com.whu.bookstore.entity;

/**
 * Created by chenshaojie on 2018/5/18,14:03.
 */
public class Item {
    private int num;
    private int id;

    public int getNum () {
        return num;
    }

    public void setNum (int num) {
        this.num = num;
    }

    public int getId () {
        return id;
    }

    public void setId (int id) {
        this.id = id;
    }

    @Override
    public boolean equals (Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Item item = (Item) o;

        if (num != item.num) return false;
        if (id != item.id) return false;

        return true;
    }

    @Override
    public int hashCode () {
        int result = num;
        result = 31 * result + id;
        return result;
    }
}
